CREATE TABLE [dbo].[TMMODE_DIST]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_MODE_DIST] [dbo].[TD_VC_003] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TMMODE_DI__NU_SE__3FDB6521] DEFAULT ((0)),
[NO_MODE_DIST] [dbo].[TD_VC_100] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_AUXI_EMPR] [dbo].[TD_VC_001] NULL,
[CO_AUXI_EMPR] [dbo].[TD_VC_020] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[PC_DIST] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TMMODE_DI__PC_DI__40CF895A] DEFAULT ((0)),
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMMODE_DI__CO_US__41C3AD93] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMMODE_DI__FE_US__42B7D1CC] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMMODE_DI__CO_US__43ABF605] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMMODE_DI__FE_US__44A01A3E] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMMODE_DIST] ADD CONSTRAINT [PK__TMMODE_D__A08608ED60DD3190] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_MODE_DIST], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMMODE_DIST] ADD CONSTRAINT [FK__TMMODE_DI__CO_EM__090B1E7B] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
